package com.system.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.system.common.bean.SeckillActivity;

import java.util.List;

public interface ISeckillActivityService {
    //启动秒杀活动 预热
    //1.秒杀的商品 SKgoodsid和数量
    //2.秒杀活动的状态，秒杀活动开始的时间戳，秒杀活动结束的时间戳

    SeckillActivity getActivityById(Integer id);

    void addActivity(SeckillActivity activity);

    void updateActivity(SeckillActivity activity);

    void deleteActivity(Integer id);

    List<SeckillActivity> getActivityList();

    IPage<SeckillActivity> getPage(SeckillActivity activity, Page<SeckillActivity> page);

    boolean isActivityActive(Integer id); // 判断活动是否进行中

    boolean startPreheat(Integer id);


}
